package chapter3.No3_4_类InheritableThreadLocal的使用.demo3;

/**
 * Created by Administrator on 2016/11/20.
 */
public class ServiceClass {

    ThreadLocal<String> threadLocal = new ThreadLocal<String>();

    public void methodA() {
        for(int i = 0; i < 10; i++) {
            threadLocal.set(Thread.currentThread().getName()+" :"+i);
            System.out.println(threadLocal.get());
        }
    }
}
